package com.cloud.model.entity.bookkeeping;

import com.cloud.model.entity.consumetype.ConsumeType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.cloud.model.entity.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * <b><code>Bookkeeping</code></b>
 * <p/>
 * Bookkeeping的具体实现
 * <p/>
 * <b>Creation Time:</b> 2019-10-15 17:24:19.
 *
 * @author ${model.author}
 * @version 1.0.0
 * @since cloud-spring-boot-be 1.0.0
 */
@Entity
@Table(name="t_bookkeeping")
@DynamicInsert
@DynamicUpdate
public class Bookkeeping extends BaseEntity implements Serializable {

    /**
    * The constant serialVersionUID.
    */
    private static final long serialVersionUID = -1L;

    public Bookkeeping(){
        super();
    }

    @Column(name = "money")
    @ApiModelProperty(value = "消费金额")
    private Long money;

    @Column(name = "consume_time")
    @ApiModelProperty(value = "消费日期")
    private Long consumeTime;

    @Column(name = "consume_type_id")
    @ApiModelProperty(value = "消费类型id")
    private Long consumeTypeId;

    @Column(name = "user_id")
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @Column(name = "is_show_time")
    @ApiModelProperty(value = "前端判断是否显示消费时间：0：否，1：是")
    private Integer isShowTime;

    @Column(name = "image_url")
    @ApiModelProperty(value = "图片List保存")
    private String imageUrl;

    @Column(name = "address")
    @ApiModelProperty(value = "消费地址")
    private String address;

    @Column(name = "address_detail")
    @ApiModelProperty(value = "详情地址")
    private String addressDetail;

    @Column(name = "remarks")
    @ApiModelProperty(value = "备注")
    private String remarks;

    @Column(name = "consume_time_day")
    @ApiModelProperty(value = "消费的日期，取当天凌晨时间戳")
    private Long consumeTimeDay;

    @ManyToOne
    @JoinColumn(name = "consume_type_id",insertable = false,updatable = false)
    private ConsumeType consumeType;

    public String getAddressDetail() {
        return addressDetail;
    }

    public void setAddressDetail(String addressDetail) {
        this.addressDetail = addressDetail;
    }

    public Long getConsumeTimeDay() {
        return consumeTimeDay;
    }

    public void setConsumeTimeDay(Long consumeTimeDay) {
        this.consumeTimeDay = consumeTimeDay;
    }

    public ConsumeType getConsumeType() {
        return consumeType;
    }

    public void setConsumeType(ConsumeType consumeType) {
        this.consumeType = consumeType;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public Long getConsumeTime() {
        return consumeTime;
    }

    public void setConsumeTime(Long consumeTime) {
        this.consumeTime = consumeTime;
    }

    public Long getConsumeTypeId() {
        return consumeTypeId;
    }

    public void setConsumeTypeId(Long consumeTypeId) {
        this.consumeTypeId = consumeTypeId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getIsShowTime() {
        return isShowTime;
    }

    public void setIsShowTime(Integer isShowTime) {
        this.isShowTime = isShowTime;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
}
